<?php

class States_AjaxState {
	private static $instancia;

	/**
	 * @var State
	 */
	private static $state;

	/**
	 * @return States_AjaxState
	 */
	public static function GetInstancia(){
		if(!self::$instancia){
			self::$instancia = new States_AjaxState();
		}

		return self::$instancia;
	}

	public function GetState(){
		if(self::$instancia){
			return $this->state->ReturnState();
		}else{
			die("Nenhum state configurando");
		}
	}

	public function SetAtivo(){
		self::$state = new States_States_StateAtivo();
	}

	public function SetInativo(){
		self::$state = new States_States_StateInativo();
	}

	public function __contruct(){
		self::$state = new States_States_StateInativo();
	}
}